package com.bien.springboot.controller;

import com.bien.springboot.util.CasUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@Slf4j
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @GetMapping
    public Object index(HttpServletRequest request) {
        log.info("index begin....getAccountNameFromCas:{}", CasUtil.getAccountNameFromCas(request));
        return "user index..getAccountNameFromCas:" + CasUtil.getAccountNameFromCas(request);
    }
}
